/*
 * Typedef.h
 *
 *  Created on: 2011-2-28
 *      Author: Dallas Cao
 */

#ifndef TYPEDEF_H_
#define TYPEDEF_H_

#ifndef MACRO_H_
#include "Macro.h"
#endif

typedef int 				BOOL;

#ifndef TRUE
#define TRUE 				1
#endif

#ifndef FALSE
#define FALSE 				0
#endif

typedef unsigned char 		BYTE;
typedef unsigned short 		WORD;
typedef unsigned long 		DWORD;
typedef unsigned long long 	QWORD;

typedef unsigned char 		UBYTE;
typedef unsigned short 		UWORD;
typedef unsigned long 		ULONG;
typedef unsigned long 		UDWORD;
typedef unsigned long long 	UQWORD;

typedef signed char 		SBYTE;
typedef signed short 		SWORD;
typedef signed long 		SLONG;
typedef signed long 		SDWORD;
typedef signed long long	SQWORD;

typedef signed int 			INT;
typedef unsigned int 		UINT;
typedef signed short 		SHORT;
typedef signed long 		LONG;

typedef BYTE 				*LPBYTE;
typedef WORD 				*LPWORD;
typedef DWORD 				*LPDWORD;

typedef SBYTE 				*LPSBYTE;
typedef SWORD 				*LPSWORD;
typedef SLONG 				*LPSLONG;
typedef SDWORD 				*LPSDWORD;

typedef UBYTE 				*LPUBYTE;
typedef UWORD 				*LPUWORD;
typedef ULONG 				*LPULONG;
typedef UDWORD 				*LPUDWORD;

typedef SHORT 				*LPSHORT;
typedef LONG 				*LPLONG;

// Byte pair
typedef union
{
	struct
	{
		BYTE L;
		BYTE H;
	} B;
	WORD W;
} PAIR, *LPPAIR;

#endif /* TYPEDEF_H_ */
